/*
 * @Author: Li Zengkun
 * @Date: 2022-09-12 19:34:33
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-18 16:29:09
 * @Description: 
 */
import axios from "axios"

// 删除指定id的友情链接
const remove = (id, params) => axios.delete(`/link/${id}`, { params })

// 启用/禁用友情链接
const usable = (data) => axios.post(`/link/usable`, data)

// 添加友情链接
const add = (data) => axios.post(`/link/`, data)

// 编辑友情链接
const edit = (id, data) => axios.put(`/link/${id}`, data)

// 获取所有友情链接列表
const list = (params) => axios.get(`/link/list`, { params })

export default {
    remove,
    usable,
    add,
    edit,
    list
}